$(function(){
	$("#codeimg").click(function(){
		var src=$(this).attr("src");
		$(this).attr("src",src+"&"+Math.random());
	})
	$("form").submit(function(){
		var data=$(this).serialize();
		$.ajax({
			url:"http://localhost/guofeng/login.php?a=admin&c=index&m=login",
			type:"post",
			data:data,
			dataType:"json",
			success:function(data){
				if(data['state']!=4){
					alert(data['msg']);
				}else{
					window.location.href="http://localhost/guofeng/login.php?a=admin&m=admin";
				}
			}
		})
		return false;
	})
})